
from apscheduler.schedulers.background import BackgroundScheduler
from message.wechat import send_enterprise_message
from utils.download import download_k_line, download_today_data
scheduler = BackgroundScheduler()
import time

def update_today_data():
    send_enterprise_message(f"开始更新 {time.strftime('%Y-%m-%d')} 数据")
    download_today_data()
    download_k_line()

scheduler.add_job(update_today_data,'cron', day_of_week='mon-fri', hour=15, minute=30)
# scheduler.add_job(update_today_data,'cron', hour=12, minute=1)



scheduler.start()